
import 'package:flutter/material.dart';

class ScreenFix extends StatelessWidget {
  @override
  Widget build(BuildContext context) {

    return MaterialApp(
      title: '全面屏适配',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: HomePage()
    );
  }
}

class HomePage extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    final EdgeInsets padding = MediaQuery.of(context).padding;

    return Container(
      padding: EdgeInsets.fromLTRB(0, padding.top, 0, padding.bottom),
      decoration:BoxDecoration(color: Colors.white),
      child: Column(
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        children: <Widget>[
          Text('顶部'),
          Text('底部'),
        ],
      ),
    );
  }
}

